
<div class="grid_12">
   <div class="box">
      <div class="header">
      <?php echo $this->Html->image('icons/packs/fugue/16x16/shadeless/table-excel.png', array("width"=>16, "height"=>16));?>
      <h3>Criaderos</h3><span></span>
      </div><!--end of header-->
      <div class="content">
         <table id="table-example" class="table">
            <thead>
               <tr>
                <th>Nro</th>
                <th>Nombre</th>
                <th>Habilitado</th>
                <th>Direccion</th>
                <th>Telefono</th>
                <th>Acciones</th>
               </tr>
            </thead><!--end of thead table-->
            <tbody>
              <?php $i=0;?>
              <?php foreach($criaderos as $criadero):?>
                                    
              <tr <?php echo fmod($i, 2) ? "class = gradeX" : "gradeA";?>>
              <?php $i++;?>
              <td><?php echo $criadero['Criadero']['id'];?></td>
              
              <td class="center"><?php echo $criadero['Criadero']['nombre']; ?></td>
              <?php 
              $estado = $criadero['Criadero']['estado'];
              if($estado == 1):
                 $descestado = "HABILITADO";
              else:
                $descestado = "DESHABILITADO";
              endif;
              ?>      
              <td class="center">
                <span <?php echo fmod($estado, 2) ? "class = deshabilitado" : "habilitado";?>>
                 <?php echo $descestado; ?>
                </span>
              </td>
              <td><?php echo $criadero['Criadero']['direccion'];?></td>
              <td>
              <?php echo $criadero['Criadero']['telefono1'];?>&nbsp;
              <?php echo $criadero['Criadero']['telefono2'];?>
              </td>
              <td>
                 <?php echo $this->Html->link('EDITAR', array('action'=>"editar",$criadero['Criadero']['id']),array('escape' => false)); ?>&nbsp;
                 <?php echo $this->Html->link('AnadirRazas', array('action'=>'insertaraza', $criadero['Criadero']['id']));?>&nbsp;
                 <?php echo $this->Html->link('HABILITAR',array('action'=>"alta",$criadero['Criadero']['id']),array('escape' => false)); ?>&nbsp;
                 <?php echo $this->Html->link('ELIMINAR',array('action'=>"eliminar",$criadero['Criadero']['id']),array('escape' => false),('Desea realmente eliminar?')); ?>
              </td>
              
              </tr>
              <?php endforeach;?>
            </tbody>
         </table><!--end of table-->
      </div><!--end of content-->
      <div class="clear"></div>
   </div><!--end of box-->
</div><!--end of grid 12 contendedor tabla-->
<div class="grid_4">
			<div id="blocks" class="box tabbed">
		 		<div class="header">
				<h3>Acciones</h3>
				</div>
				<div class="content">
					<ul id="block-list-icons" class="block-list with-icon tab-content">
						<li class="i-16-calendar"><?php echo $this->Html->link('Lista de criaderos', array('action'=>'index'));?></li>
						<li class="i-16-application"><?php echo $this->Html->link('Registrar nuevo', array('action'=>'insertar'));?></li>
						<li class="i-16-drive">
                        <?php echo $this->Html->link('Habilitar criaderos', array('action'=>'habilitar'))?>
                        </li>
						<li class="i-16-chart">Reportes</li>
						<li class="i-16-balloon">Lorem ipsum</li>
					</ul>
				</div> <!-- End of .content -->
				</div> <!-- End of .box -->
</div> <!-- End of .grid_4 -->